package wenqi.housemediator;

public class BegRentHouse implements Colleague{
    ConcreteMediator mediator;
    String name;
    BegRentHouse(ConcreteMediator mediator){
        this.mediator=mediator;
    }

    @Override
    public String getName() {
        return name;
    }

    @Override
    public void setName(String name) {
        this.name = name;
    }
    public void giveMess(String mess){
        mediator.deliverMess(this,mess);
    }
    public void receiverMess(String mess){
        System.out.println(name+"收到的信息：");
        System.out.println("\t" + mess);
    }
}
